/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('copyright', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model BatchCheckPatentAddRequest {
  applyNumber?: string(name='ApplyNumber'),
}

model BatchCheckPatentAddResponseBody = {
  cacheKey?: string(name='CacheKey'),
  canAddCount?: int32(name='CanAddCount'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
  existCount?: int32(name='ExistCount'),
  errorDetail?: [ 
    {
      message?: string(name='Message'),
      success?: boolean(name='Success'),
      applyNumber?: string(name='ApplyNumber'),
    }
  ](name='ErrorDetail'),
  tradeList?: [ 
    {
      type?: string(name='Type'),
      needFee?: float(name='NeedFee'),
      discount?: string(name='Discount'),
      needCount?: int32(name='NeedCount'),
      totalCount?: long(name='TotalCount'),
      age?: string(name='Age'),
      existCount?: long(name='ExistCount'),
    }
  ](name='TradeList'),
}

model BatchCheckPatentAddResponse = {
  headers: map[string]string(name='headers'),
  body: BatchCheckPatentAddResponseBody(name='body'),
}

async function batchCheckPatentAddWithOptions(request: BatchCheckPatentAddRequest, runtime: Util.RuntimeOptions): BatchCheckPatentAddResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BatchCheckPatentAdd', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function batchCheckPatentAdd(request: BatchCheckPatentAddRequest): BatchCheckPatentAddResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchCheckPatentAddWithOptions(request, runtime);
}

model BatchPatentAddRequest {
  applyNumber?: string(name='ApplyNumber'),
}

model BatchPatentAddResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      message?: string(name='Message'),
      success?: boolean(name='Success'),
      applyNumber?: string(name='ApplyNumber'),
    }
  ](name='Data'),
}

model BatchPatentAddResponse = {
  headers: map[string]string(name='headers'),
  body: BatchPatentAddResponseBody(name='body'),
}

async function batchPatentAddWithOptions(request: BatchPatentAddRequest, runtime: Util.RuntimeOptions): BatchPatentAddResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('BatchPatentAdd', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function batchPatentAdd(request: BatchPatentAddRequest): BatchPatentAddResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchPatentAddWithOptions(request, runtime);
}

model CheckPatentSellStatusRequest {
  applyNumber?: string(name='ApplyNumber'),
}

model CheckPatentSellStatusResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      type?: string(name='Type'),
      endDate?: string(name='EndDate'),
      errorMessage?: string(name='ErrorMessage'),
      applyNumber?: string(name='ApplyNumber'),
      discount?: string(name='Discount'),
      age?: string(name='Age'),
      fee?: float(name='Fee'),
    }
  ](name='Data'),
}

model CheckPatentSellStatusResponse = {
  headers: map[string]string(name='headers'),
  body: CheckPatentSellStatusResponseBody(name='body'),
}

async function checkPatentSellStatusWithOptions(request: CheckPatentSellStatusRequest, runtime: Util.RuntimeOptions): CheckPatentSellStatusResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('CheckPatentSellStatus', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function checkPatentSellStatus(request: CheckPatentSellStatusRequest): CheckPatentSellStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkPatentSellStatusWithOptions(request, runtime);
}

model DeleteCopyrightPersonRequest {
  personId?: long(name='PersonId'),
}

model DeleteCopyrightPersonResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model DeleteCopyrightPersonResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteCopyrightPersonResponseBody(name='body'),
}

async function deleteCopyrightPersonWithOptions(request: DeleteCopyrightPersonRequest, runtime: Util.RuntimeOptions): DeleteCopyrightPersonResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteCopyrightPerson', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteCopyrightPerson(request: DeleteCopyrightPersonRequest): DeleteCopyrightPersonResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCopyrightPersonWithOptions(request, runtime);
}

model DeletePatentContactRequest {
  id?: long(name='Id'),
}

model DeletePatentContactResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model DeletePatentContactResponse = {
  headers: map[string]string(name='headers'),
  body: DeletePatentContactResponseBody(name='body'),
}

async function deletePatentContactWithOptions(request: DeletePatentContactRequest, runtime: Util.RuntimeOptions): DeletePatentContactResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeletePatentContact', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deletePatentContact(request: DeletePatentContactRequest): DeletePatentContactResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePatentContactWithOptions(request, runtime);
}

model DeletePatentPlanRequest {
  planId?: long(name='PlanId'),
  deletePlanDetail?: boolean(name='DeletePlanDetail'),
}

model DeletePatentPlanResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model DeletePatentPlanResponse = {
  headers: map[string]string(name='headers'),
  body: DeletePatentPlanResponseBody(name='body'),
}

async function deletePatentPlanWithOptions(request: DeletePatentPlanRequest, runtime: Util.RuntimeOptions): DeletePatentPlanResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeletePatentPlan', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deletePatentPlan(request: DeletePatentPlanRequest): DeletePatentPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePatentPlanWithOptions(request, runtime);
}

model DeletePatentPlanDetailRequest {
  planId?: string(name='PlanId'),
  applyNumbers?: string(name='ApplyNumbers'),
}

model DeletePatentPlanDetailResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model DeletePatentPlanDetailResponse = {
  headers: map[string]string(name='headers'),
  body: DeletePatentPlanDetailResponseBody(name='body'),
}

async function deletePatentPlanDetailWithOptions(request: DeletePatentPlanDetailRequest, runtime: Util.RuntimeOptions): DeletePatentPlanDetailResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeletePatentPlanDetail', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deletePatentPlanDetail(request: DeletePatentPlanDetailRequest): DeletePatentPlanDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePatentPlanDetailWithOptions(request, runtime);
}

model DeleteUserSearchCompanyRequest {
  id?: long(name='Id'),
}

model DeleteUserSearchCompanyResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model DeleteUserSearchCompanyResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteUserSearchCompanyResponseBody(name='body'),
}

async function deleteUserSearchCompanyWithOptions(request: DeleteUserSearchCompanyRequest, runtime: Util.RuntimeOptions): DeleteUserSearchCompanyResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteUserSearchCompany', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteUserSearchCompany(request: DeleteUserSearchCompanyRequest): DeleteUserSearchCompanyResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserSearchCompanyWithOptions(request, runtime);
}

model DescribePolicyRequest {
  fileType?: string(name='FileType'),
  bizType?: string(name='BizType'),
}

model DescribePolicyResponseBody = {
  signature?: string(name='Signature'),
  host?: string(name='Host'),
  requestId?: string(name='RequestId'),
  expireTime?: long(name='ExpireTime'),
  encodedPolicy?: string(name='EncodedPolicy'),
  fileDir?: string(name='FileDir'),
  accessId?: string(name='AccessId'),
}

model DescribePolicyResponse = {
  headers: map[string]string(name='headers'),
  body: DescribePolicyResponseBody(name='body'),
}

async function describePolicyWithOptions(request: DescribePolicyRequest, runtime: Util.RuntimeOptions): DescribePolicyResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribePolicy', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describePolicy(request: DescribePolicyRequest): DescribePolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePolicyWithOptions(request, runtime);
}

model DescribeUserProduceRequest {
  bizId?: string(name='BizId'),
  bizType?: string(name='BizType'),
  extInfo?: string(name='ExtInfo'),
}

model DescribeUserProduceResponseBody = {
  status?: int32(name='Status'),
  orderPrice?: string(name='OrderPrice'),
  solutionBizId?: string(name='SolutionBizId'),
  success?: boolean(name='Success'),
  userId?: string(name='UserId'),
  bizId?: string(name='BizId'),
  partnerCode?: string(name='PartnerCode'),
  extInfo?: string(name='ExtInfo'),
  bizType?: string(name='BizType'),
  intentionBizId?: string(name='IntentionBizId'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
  requestId?: string(name='RequestId'),
  errorCode?: string(name='ErrorCode'),
  errorMsg?: string(name='ErrorMsg'),
  orderId?: string(name='OrderId'),
}

model DescribeUserProduceResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeUserProduceResponseBody(name='body'),
}

async function describeUserProduceWithOptions(request: DescribeUserProduceRequest, runtime: Util.RuntimeOptions): DescribeUserProduceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeUserProduce', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeUserProduce(request: DescribeUserProduceRequest): DescribeUserProduceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUserProduceWithOptions(request, runtime);
}

model ExportPatentPlanDetailRequest {
  planId?: long(name='PlanId'),
}

model ExportPatentPlanDetailResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ExportPatentPlanDetailResponse = {
  headers: map[string]string(name='headers'),
  body: ExportPatentPlanDetailResponseBody(name='body'),
}

async function exportPatentPlanDetailWithOptions(request: ExportPatentPlanDetailRequest, runtime: Util.RuntimeOptions): ExportPatentPlanDetailResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('ExportPatentPlanDetail', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function exportPatentPlanDetail(request: ExportPatentPlanDetailRequest): ExportPatentPlanDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportPatentPlanDetailWithOptions(request, runtime);
}

model GetCacheCheckAddParamRequest {
  cacheKey?: string(name='CacheKey'),
}

model GetCacheCheckAddParamResponseBody = {
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  applyNumber?: string(name='ApplyNumber'),
}

model GetCacheCheckAddParamResponse = {
  headers: map[string]string(name='headers'),
  body: GetCacheCheckAddParamResponseBody(name='body'),
}

async function getCacheCheckAddParamWithOptions(request: GetCacheCheckAddParamRequest, runtime: Util.RuntimeOptions): GetCacheCheckAddParamResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetCacheCheckAddParam', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getCacheCheckAddParam(request: GetCacheCheckAddParamRequest): GetCacheCheckAddParamResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCacheCheckAddParamWithOptions(request, runtime);
}

model GetCopyrightPersonDetailRequest {
  personId?: int32(name='PersonId'),
  useType?: string(name='UseType'),
}

model GetCopyrightPersonDetailResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: {
    legalPersonType?: string(name='LegalPersonType'),
    roleType?: int32(name='RoleType'),
    enterpriseLicensePath?: string(name='EnterpriseLicensePath'),
    city?: string(name='City'),
    phone?: string(name='Phone'),
    idBackImage?: string(name='IdBackImage'),
    county?: string(name='County'),
    enterpriseTime?: string(name='EnterpriseTime'),
    userPk?: string(name='UserPk'),
    cardType?: string(name='CardType'),
    email?: string(name='Email'),
    cardNum?: string(name='CardNum'),
    enterprisePark?: string(name='EnterprisePark'),
    address?: string(name='Address'),
    ownerType?: int32(name='OwnerType'),
    name?: string(name='Name'),
    idFrontImage?: string(name='IdFrontImage'),
    personId?: string(name='PersonId'),
    province?: string(name='Province'),
    idHandedImage?: string(name='IdHandedImage'),
    enterpriseType?: string(name='EnterpriseType'),
  }(name='Data'),
}

model GetCopyrightPersonDetailResponse = {
  headers: map[string]string(name='headers'),
  body: GetCopyrightPersonDetailResponseBody(name='body'),
}

async function getCopyrightPersonDetailWithOptions(request: GetCopyrightPersonDetailRequest, runtime: Util.RuntimeOptions): GetCopyrightPersonDetailResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetCopyrightPersonDetail', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getCopyrightPersonDetail(request: GetCopyrightPersonDetailRequest): GetCopyrightPersonDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCopyrightPersonDetailWithOptions(request, runtime);
}

model GetCopyrightPersonListRequest {
  roleType?: int32(name='RoleType'),
  ownerType?: int32(name='OwnerType'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  keyword?: string(name='Keyword'),
}

model GetCopyrightPersonListResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  pageSize?: int32(name='PageSize'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  data?: [ 
    {
      legalPersonType?: string(name='LegalPersonType'),
      roleType?: int32(name='RoleType'),
      city?: string(name='City'),
      phone?: string(name='Phone'),
      county?: string(name='County'),
      userPk?: string(name='UserPk'),
      cardType?: string(name='CardType'),
      email?: string(name='Email'),
      cardNum?: string(name='CardNum'),
      address?: string(name='Address'),
      ownerType?: int32(name='OwnerType'),
      name?: string(name='Name'),
      personId?: string(name='PersonId'),
      province?: string(name='Province'),
    }
  ](name='Data'),
}

model GetCopyrightPersonListResponse = {
  headers: map[string]string(name='headers'),
  body: GetCopyrightPersonListResponseBody(name='body'),
}

async function getCopyrightPersonListWithOptions(request: GetCopyrightPersonListRequest, runtime: Util.RuntimeOptions): GetCopyrightPersonListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetCopyrightPersonList', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getCopyrightPersonList(request: GetCopyrightPersonListRequest): GetCopyrightPersonListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCopyrightPersonListWithOptions(request, runtime);
}

model GetPatentFeeStatisticsInfoRequest {
  userType?: string(name='UserType'),
  startDate?: long(name='StartDate'),
  endDate?: long(name='EndDate'),
}

model GetPatentFeeStatisticsInfoResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: {
    userType?: string(name='UserType'),
    discountPrice?: float(name='DiscountPrice'),
    usedCount?: int32(name='UsedCount'),
    shiyongCount?: int32(name='ShiyongCount'),
    waiguanCount?: int32(name='WaiguanCount'),
    totalPrice?: float(name='TotalPrice'),
    total?: int32(name='Total'),
    freeCount?: int32(name='FreeCount'),
    famingCount?: int32(name='FamingCount'),
    ageInfo?: [ 
      {
        type?: string(name='Type'),
        discountPrice?: float(name='DiscountPrice'),
        salePrice?: float(name='SalePrice'),
        age?: string(name='Age'),
        count?: int32(name='Count'),
      }
    ](name='AgeInfo'),
  }(name='Data'),
}

model GetPatentFeeStatisticsInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetPatentFeeStatisticsInfoResponseBody(name='body'),
}

async function getPatentFeeStatisticsInfoWithOptions(request: GetPatentFeeStatisticsInfoRequest, runtime: Util.RuntimeOptions): GetPatentFeeStatisticsInfoResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('GetPatentFeeStatisticsInfo', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function getPatentFeeStatisticsInfo(request: GetPatentFeeStatisticsInfoRequest): GetPatentFeeStatisticsInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPatentFeeStatisticsInfoWithOptions(request, runtime);
}

model GetPatentOverviewInfoRequest {
  userType?: string(name='UserType'),
}

model GetPatentOverviewInfoResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      userType?: string(name='UserType'),
      waiguanCount?: int32(name='WaiguanCount'),
      total?: int32(name='Total'),
      shiyongCount?: int32(name='ShiyongCount'),
      famingCount?: int32(name='FamingCount'),
    }
  ](name='Data'),
}

model GetPatentOverviewInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetPatentOverviewInfoResponseBody(name='body'),
}

async function getPatentOverviewInfoWithOptions(request: GetPatentOverviewInfoRequest, runtime: Util.RuntimeOptions): GetPatentOverviewInfoResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('GetPatentOverviewInfo', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function getPatentOverviewInfo(request: GetPatentOverviewInfoRequest): GetPatentOverviewInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPatentOverviewInfoWithOptions(request, runtime);
}

model GetPatentPlanDetailListRequest {
  keyword?: string(name='Keyword'),
  planId?: long(name='PlanId'),
  type?: string(name='Type'),
  payStatus?: int32(name='PayStatus'),
  soldStatus?: int32(name='SoldStatus'),
  startYear?: int32(name='StartYear'),
  endYear?: int32(name='EndYear'),
  discount?: string(name='Discount'),
}

model GetPatentPlanDetailListResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      type?: int32(name='Type'),
      owner?: string(name='Owner'),
      paidDate?: string(name='PaidDate'),
      planPayDate?: string(name='PlanPayDate'),
      soldStatus?: int32(name='SoldStatus'),
      applyNumber?: string(name='ApplyNumber'),
      bizId?: string(name='BizId'),
      gmtExpireDate?: string(name='GmtExpireDate'),
      planId?: long(name='PlanId'),
      year?: int32(name='Year'),
      payStatus?: int32(name='PayStatus'),
      planDetailId?: long(name='PlanDetailId'),
      agency?: string(name='Agency'),
      discount?: int32(name='Discount'),
      uidAgreement?: boolean(name='UidAgreement'),
      name?: string(name='Name'),
    }
  ](name='Data'),
}

model GetPatentPlanDetailListResponse = {
  headers: map[string]string(name='headers'),
  body: GetPatentPlanDetailListResponseBody(name='body'),
}

async function getPatentPlanDetailListWithOptions(request: GetPatentPlanDetailListRequest, runtime: Util.RuntimeOptions): GetPatentPlanDetailListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPatentPlanDetailList', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPatentPlanDetailList(request: GetPatentPlanDetailListRequest): GetPatentPlanDetailListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPatentPlanDetailListWithOptions(request, runtime);
}

model GetPatentPlanInfoRequest {
  planId?: long(name='PlanId'),
}

model GetPatentPlanInfoResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      owner?: string(name='Owner'),
      planId?: int32(name='PlanId'),
      name?: string(name='Name'),
      contact?: string(name='Contact'),
    }
  ](name='Data'),
}

model GetPatentPlanInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetPatentPlanInfoResponseBody(name='body'),
}

async function getPatentPlanInfoWithOptions(request: GetPatentPlanInfoRequest, runtime: Util.RuntimeOptions): GetPatentPlanInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPatentPlanInfo', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPatentPlanInfo(request: GetPatentPlanInfoRequest): GetPatentPlanInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPatentPlanInfoWithOptions(request, runtime);
}

model GetPatentPlanListRequest {
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  keyword?: string(name='Keyword'),
}

model GetPatentPlanListResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      owner?: string(name='Owner'),
      contact?: string(name='Contact'),
      soldCount?: int32(name='SoldCount'),
      unSoldCount?: string(name='UnSoldCount'),
      name?: string(name='Name'),
      planId?: long(name='PlanId'),
      totalCount?: int32(name='TotalCount'),
    }
  ](name='Data'),
}

model GetPatentPlanListResponse = {
  headers: map[string]string(name='headers'),
  body: GetPatentPlanListResponseBody(name='body'),
}

async function getPatentPlanListWithOptions(request: GetPatentPlanListRequest, runtime: Util.RuntimeOptions): GetPatentPlanListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPatentPlanList', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPatentPlanList(request: GetPatentPlanListRequest): GetPatentPlanListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPatentPlanListWithOptions(request, runtime);
}

model GetPatentStatisticsDetailListRequest {
  userType?: string(name='UserType'),
  startDate?: long(name='StartDate'),
  endDate?: long(name='EndDate'),
  keyword?: string(name='Keyword'),
  type?: string(name='Type'),
  discount?: string(name='Discount'),
  startYear?: int32(name='StartYear'),
  endYear?: int32(name='EndYear'),
}

model GetPatentStatisticsDetailListResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      type?: string(name='Type'),
      year?: int32(name='Year'),
      owner?: string(name='Owner'),
      discountPrice?: float(name='DiscountPrice'),
      agency?: string(name='Agency'),
      applyNumber?: string(name='ApplyNumber'),
      discount?: string(name='Discount'),
      name?: string(name='Name'),
      salePrice?: float(name='SalePrice'),
      age?: string(name='Age'),
      payEndDate?: string(name='PayEndDate'),
    }
  ](name='Data'),
}

model GetPatentStatisticsDetailListResponse = {
  headers: map[string]string(name='headers'),
  body: GetPatentStatisticsDetailListResponseBody(name='body'),
}

async function getPatentStatisticsDetailListWithOptions(request: GetPatentStatisticsDetailListRequest, runtime: Util.RuntimeOptions): GetPatentStatisticsDetailListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('GetPatentStatisticsDetailList', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function getPatentStatisticsDetailList(request: GetPatentStatisticsDetailListRequest): GetPatentStatisticsDetailListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPatentStatisticsDetailListWithOptions(request, runtime);
}

model GetTicketsInfoRequest {
  bizId?: string(name='BizId'),
}

model GetTicketsInfoResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      invoiceUrl?: string(name='InvoiceUrl'),
      remark?: string(name='Remark'),
      patentNo?: long(name='PatentNo'),
      invoiceYear?: int32(name='InvoiceYear'),
      fee?: string(name='Fee'),
    }
  ](name='Data'),
}

model GetTicketsInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetTicketsInfoResponseBody(name='body'),
}

async function getTicketsInfoWithOptions(request: GetTicketsInfoRequest, runtime: Util.RuntimeOptions): GetTicketsInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetTicketsInfo', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getTicketsInfo(request: GetTicketsInfoRequest): GetTicketsInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTicketsInfoWithOptions(request, runtime);
}

model GetUserPatentStatisticsStatusResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      status?: int32(name='Status'),
    }
  ](name='Data'),
}

model GetUserPatentStatisticsStatusResponse = {
  headers: map[string]string(name='headers'),
  body: GetUserPatentStatisticsStatusResponseBody(name='body'),
}

async function getUserPatentStatisticsStatusWithOptions(runtime: Util.RuntimeOptions): GetUserPatentStatisticsStatusResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('GetUserPatentStatisticsStatus', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function getUserPatentStatisticsStatus(): GetUserPatentStatisticsStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserPatentStatisticsStatusWithOptions(runtime);
}

model ListPatentContactResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      email?: string(name='Email'),
      name?: string(name='Name'),
      mobile?: string(name='Mobile'),
      id?: long(name='Id'),
    }
  ](name='Data'),
}

model ListPatentContactResponse = {
  headers: map[string]string(name='headers'),
  body: ListPatentContactResponseBody(name='body'),
}

async function listPatentContactWithOptions(runtime: Util.RuntimeOptions): ListPatentContactResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('ListPatentContact', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPatentContact(): ListPatentContactResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPatentContactWithOptions(runtime);
}

model ListPatentUserSearchCompanyRequest {
  limit?: int32(name='Limit'),
  type?: int32(name='Type'),
}

model ListPatentUserSearchCompanyResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      type?: int32(name='Type'),
      enterpriseName?: string(name='EnterpriseName'),
      id?: long(name='Id'),
    }
  ](name='Data'),
}

model ListPatentUserSearchCompanyResponse = {
  headers: map[string]string(name='headers'),
  body: ListPatentUserSearchCompanyResponseBody(name='body'),
}

async function listPatentUserSearchCompanyWithOptions(request: ListPatentUserSearchCompanyRequest, runtime: Util.RuntimeOptions): ListPatentUserSearchCompanyResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPatentUserSearchCompany', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPatentUserSearchCompany(request: ListPatentUserSearchCompanyRequest): ListPatentUserSearchCompanyResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPatentUserSearchCompanyWithOptions(request, runtime);
}

model ListUserHistoryProducesRequest {
  bizId?: string(name='BizId'),
  bizType?: string(name='BizType'),
  orderId?: string(name='OrderId'),
  status?: int32(name='Status'),
  intentionBizId?: string(name='IntentionBizId'),
  solutionBizId?: string(name='SolutionBizId'),
  extCondition?: string(name='ExtCondition'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortParam?: string(name='SortParam'),
}

model ListUserHistoryProducesResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      status?: int32(name='Status'),
      orderPrice?: string(name='OrderPrice'),
      solutionBizId?: string(name='SolutionBizId'),
      userId?: string(name='UserId'),
      bizId?: string(name='BizId'),
      orderTime?: string(name='OrderTime'),
      partnerCode?: string(name='PartnerCode'),
      extInfo?: string(name='ExtInfo'),
      bizType?: string(name='BizType'),
      intentionBizId?: string(name='IntentionBizId'),
      oldOrder?: boolean(name='OldOrder'),
      orderId?: string(name='OrderId'),
      modifyTime?: string(name='ModifyTime'),
    }
  ](name='Data'),
}

model ListUserHistoryProducesResponse = {
  headers: map[string]string(name='headers'),
  body: ListUserHistoryProducesResponseBody(name='body'),
}

async function listUserHistoryProducesWithOptions(request: ListUserHistoryProducesRequest, runtime: Util.RuntimeOptions): ListUserHistoryProducesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListUserHistoryProduces', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listUserHistoryProduces(request: ListUserHistoryProducesRequest): ListUserHistoryProducesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserHistoryProducesWithOptions(request, runtime);
}

model ListUserProduceOperateLogsRequest {
  bizType?: string(name='BizType'),
  bizId?: string(name='BizId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model ListUserProduceOperateLogsResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      operateTime?: long(name='OperateTime'),
      operateUserType?: string(name='OperateUserType'),
      bizId?: string(name='BizId'),
      note?: string(name='Note'),
      operateName?: string(name='OperateName'),
      bizStatus?: int32(name='BizStatus'),
      toBizStatus?: int32(name='ToBizStatus'),
      bizType?: string(name='BizType'),
    }
  ](name='Data'),
}

model ListUserProduceOperateLogsResponse = {
  headers: map[string]string(name='headers'),
  body: ListUserProduceOperateLogsResponseBody(name='body'),
}

async function listUserProduceOperateLogsWithOptions(request: ListUserProduceOperateLogsRequest, runtime: Util.RuntimeOptions): ListUserProduceOperateLogsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = query,
  };
  return doRPCRequest('ListUserProduceOperateLogs', '2019-01-23', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}

async function listUserProduceOperateLogs(request: ListUserProduceOperateLogsRequest): ListUserProduceOperateLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserProduceOperateLogsWithOptions(request, runtime);
}

model ListUserProducesRequest {
  bizId?: string(name='BizId'),
  bizType?: string(name='BizType'),
  orderId?: string(name='OrderId'),
  status?: int32(name='Status'),
  intentionBizId?: string(name='IntentionBizId'),
  solutionBizId?: string(name='SolutionBizId'),
  extCondition?: string(name='ExtCondition'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortParam?: string(name='SortParam'),
}

model ListUserProducesResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      status?: int32(name='Status'),
      orderPrice?: string(name='OrderPrice'),
      solutionBizId?: string(name='SolutionBizId'),
      userId?: string(name='UserId'),
      bizId?: string(name='BizId'),
      orderTime?: string(name='OrderTime'),
      partnerCode?: string(name='PartnerCode'),
      extInfo?: string(name='ExtInfo'),
      bizType?: string(name='BizType'),
      intentionBizId?: string(name='IntentionBizId'),
      endTime?: string(name='EndTime'),
      startTime?: string(name='StartTime'),
      orderId?: string(name='OrderId'),
      modifyTime?: string(name='ModifyTime'),
    }
  ](name='Data'),
}

model ListUserProducesResponse = {
  headers: map[string]string(name='headers'),
  body: ListUserProducesResponseBody(name='body'),
}

async function listUserProducesWithOptions(request: ListUserProducesRequest, runtime: Util.RuntimeOptions): ListUserProducesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListUserProduces', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listUserProduces(request: ListUserProducesRequest): ListUserProducesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserProducesWithOptions(request, runtime);
}

model OpenPatentStatisticsResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model OpenPatentStatisticsResponse = {
  headers: map[string]string(name='headers'),
  body: OpenPatentStatisticsResponseBody(name='body'),
}

async function openPatentStatisticsWithOptions(runtime: Util.RuntimeOptions): OpenPatentStatisticsResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('OpenPatentStatistics', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function openPatentStatistics(): OpenPatentStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return openPatentStatisticsWithOptions(runtime);
}

model OperateFeeOrderRequest {
  id?: string(name='Id'),
  status?: string(name='Status'),
}

model OperateFeeOrderResponseBody = {
  success?: boolean(name='Success'),
  requestId?: string(name='RequestId'),
}

model OperateFeeOrderResponse = {
  headers: map[string]string(name='headers'),
  body: OperateFeeOrderResponseBody(name='body'),
}

async function operateFeeOrderWithOptions(request: OperateFeeOrderRequest, runtime: Util.RuntimeOptions): OperateFeeOrderResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('OperateFeeOrder', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function operateFeeOrder(request: OperateFeeOrderRequest): OperateFeeOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return operateFeeOrderWithOptions(request, runtime);
}

model OperateProduceForPartnerRequest {
  operateType?: string(name='OperateType'),
  bizId?: string(name='BizId'),
  extInfo?: string(name='ExtInfo'),
  bizType?: string(name='BizType'),
  note?: string(name='Note'),
}

model OperateProduceForPartnerResponseBody = {
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  errorCode?: string(name='ErrorCode'),
}

model OperateProduceForPartnerResponse = {
  headers: map[string]string(name='headers'),
  body: OperateProduceForPartnerResponseBody(name='body'),
}

async function operateProduceForPartnerWithOptions(request: OperateProduceForPartnerRequest, runtime: Util.RuntimeOptions): OperateProduceForPartnerResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('OperateProduceForPartner', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function operateProduceForPartner(request: OperateProduceForPartnerRequest): OperateProduceForPartnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return operateProduceForPartnerWithOptions(request, runtime);
}

model OperateProduceForUserRequest {
  bizType?: string(name='BizType'),
  bizId?: string(name='BizId'),
  operateType?: string(name='OperateType'),
  extInfo?: string(name='ExtInfo'),
}

model OperateProduceForUserResponseBody = {
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  errorCode?: string(name='ErrorCode'),
}

model OperateProduceForUserResponse = {
  headers: map[string]string(name='headers'),
  body: OperateProduceForUserResponseBody(name='body'),
}

async function operateProduceForUserWithOptions(request: OperateProduceForUserRequest, runtime: Util.RuntimeOptions): OperateProduceForUserResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('OperateProduceForUser', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function operateProduceForUser(request: OperateProduceForUserRequest): OperateProduceForUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return operateProduceForUserWithOptions(request, runtime);
}

model SaveCopyrightPersonRequest {
  roleType?: int32(name='RoleType'),
  personId?: long(name='PersonId'),
  name?: string(name='Name'),
  ownerType?: int32(name='OwnerType'),
  legalPersonType?: string(name='LegalPersonType'),
  cardType?: string(name='CardType'),
  cardNum?: string(name='CardNum'),
  province?: string(name='Province'),
  city?: string(name='City'),
  county?: string(name='County'),
  address?: string(name='Address'),
  phone?: string(name='Phone'),
  email?: string(name='Email'),
  idFrontImage?: string(name='IdFrontImage'),
  idBackImage?: string(name='IdBackImage'),
  idHandedImage?: string(name='IdHandedImage'),
  enterpriseLicensePath?: string(name='EnterpriseLicensePath'),
  enterprisePark?: string(name='EnterprisePark'),
  enterpriseTime?: string(name='EnterpriseTime'),
  enterpriseType?: string(name='EnterpriseType'),
}

model SaveCopyrightPersonResponseBody = {
  requestId?: string(name='RequestId'),
  personId?: long(name='PersonId'),
  success?: boolean(name='Success'),
}

model SaveCopyrightPersonResponse = {
  headers: map[string]string(name='headers'),
  body: SaveCopyrightPersonResponseBody(name='body'),
}

async function saveCopyrightPersonWithOptions(request: SaveCopyrightPersonRequest, runtime: Util.RuntimeOptions): SaveCopyrightPersonResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveCopyrightPerson', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveCopyrightPerson(request: SaveCopyrightPersonRequest): SaveCopyrightPersonResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveCopyrightPersonWithOptions(request, runtime);
}

model SaveOrUpdatePatentPlanRequest {
  planId?: long(name='PlanId'),
  name?: string(name='Name'),
  owner?: string(name='Owner'),
  contact?: string(name='Contact'),
  applyNumbers?: string(name='ApplyNumbers'),
}

model SaveOrUpdatePatentPlanResponseBody = {
  requestId?: string(name='RequestId'),
  id?: [ string ](name='Id'),
}

model SaveOrUpdatePatentPlanResponse = {
  headers: map[string]string(name='headers'),
  body: SaveOrUpdatePatentPlanResponseBody(name='body'),
}

async function saveOrUpdatePatentPlanWithOptions(request: SaveOrUpdatePatentPlanRequest, runtime: Util.RuntimeOptions): SaveOrUpdatePatentPlanResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveOrUpdatePatentPlan', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveOrUpdatePatentPlan(request: SaveOrUpdatePatentPlanRequest): SaveOrUpdatePatentPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveOrUpdatePatentPlanWithOptions(request, runtime);
}

model SaveOrUpdateUserSearchCompanyRequest {
  enterpriseName?: string(name='EnterpriseName'),
  type?: int32(name='Type'),
}

model SaveOrUpdateUserSearchCompanyResponseBody = {
  id?: long(name='Id'),
  requestId?: string(name='RequestId'),
}

model SaveOrUpdateUserSearchCompanyResponse = {
  headers: map[string]string(name='headers'),
  body: SaveOrUpdateUserSearchCompanyResponseBody(name='body'),
}

async function saveOrUpdateUserSearchCompanyWithOptions(request: SaveOrUpdateUserSearchCompanyRequest, runtime: Util.RuntimeOptions): SaveOrUpdateUserSearchCompanyResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveOrUpdateUserSearchCompany', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveOrUpdateUserSearchCompany(request: SaveOrUpdateUserSearchCompanyRequest): SaveOrUpdateUserSearchCompanyResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveOrUpdateUserSearchCompanyWithOptions(request, runtime);
}

model SavePatentContactRequest {
  name?: string(name='Name'),
  email?: string(name='Email'),
  mobile?: string(name='Mobile'),
  id?: long(name='Id'),
}

model SavePatentContactResponseBody = {
  pageNum?: int32(name='PageNum'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalItemNum?: int32(name='TotalItemNum'),
  pageSize?: int32(name='PageSize'),
  totalPageNum?: int32(name='TotalPageNum'),
  data?: [ 
    {
      email?: string(name='Email'),
      name?: string(name='Name'),
      mobile?: string(name='Mobile'),
      id?: long(name='Id'),
    }
  ](name='Data'),
}

model SavePatentContactResponse = {
  headers: map[string]string(name='headers'),
  body: SavePatentContactResponseBody(name='body'),
}

async function savePatentContactWithOptions(request: SavePatentContactRequest, runtime: Util.RuntimeOptions): SavePatentContactResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SavePatentContact', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function savePatentContact(request: SavePatentContactRequest): SavePatentContactResponse {
  var runtime = new Util.RuntimeOptions{};
  return savePatentContactWithOptions(request, runtime);
}

model VerifyOwnerInfoRequest {
  name?: string(name='Name'),
  ownerType?: string(name='OwnerType'),
  cardType?: string(name='CardType'),
  cardNum?: string(name='CardNum'),
  province?: string(name='Province'),
  city?: string(name='City'),
}

model VerifyOwnerInfoResponseBody = {
  birthDate?: string(name='BirthDate'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  message?: string(name='Message'),
  verifyResult?: boolean(name='VerifyResult'),
  phone?: string(name='Phone'),
}

model VerifyOwnerInfoResponse = {
  headers: map[string]string(name='headers'),
  body: VerifyOwnerInfoResponseBody(name='body'),
}

async function verifyOwnerInfoWithOptions(request: VerifyOwnerInfoRequest, runtime: Util.RuntimeOptions): VerifyOwnerInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('VerifyOwnerInfo', '2019-01-23', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function verifyOwnerInfo(request: VerifyOwnerInfoRequest): VerifyOwnerInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyOwnerInfoWithOptions(request, runtime);
}

